home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet multimedia
/
Linux LiveCD
/
GeeXboX 1.0 EN
/
geexbox-1.0-en.i386.iso
/
GEEXBOX
/
etc
/
init.d
/
58_samba
< prev
next >
Wrap
Text File
|
2006-06-21
|
737b
|
36 lines
#!/bin/sh
#
# mount samba shares
#
# runlevels: geexbox, debug
if test -x /usr/bin/smbmount -a -f /etc/network; then
echo "### Mounting Samba shares ###"
(
. /etc/network
OPT="-N"
test -n "$SMB_USER" && OPT="-U$SMB_USER%$SMB_PWD"
saveifs=$IFS
smbtree $OPT | while read mounts; do
(
IFS=/
set $mounts
name=$1
ip=$2
shift 2
while [ $# -gt 0 ]; do
dir="/mnt/shares/$name/$1"
mkdir -p "$dir"
mount "//$ip/$1" "$dir" -t cifs -o "ro,servern=$name,user=$SMB_USER,pass=$SMB_PWD" || \
smbmount "//$name/$1" "$dir" -o "ro,ip=$ip,username=$SMB_USER,passwd=$SMB_PWD" || \
rmdir -p "$dir"
shift
done
IFS=$saveifs
)&
done
)>/dev/null 2>&1 &
fi
exit 0